// dlg.txt

//MK Edit

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 18;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "The pathway grows very narrow. The trees feel like they are pushing in on you, but the effect is getting easier to ignore. You are getting used to the claustrophobia of the Kranas.";
	text2 = "But this forest is different. You can sense a hostile, angry energy, growing stronger the farther in you get.";
	text3 = "You have found one of the sacred groves of the Kranas Woods. Sacred to them. To you, it is just another chunk of unbalanced magic, spraying chaos into your vassal state.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "You find a morbid sight. This grove is littered with bones. Some recently placed here. Some old. All of them sinking into the loam, all of them scraped clean. Roots reach out out of the earth, grab them, and very slowly pull them down.";
	text2 = "All of the bones are human. Some are bent with age. Others are clearly children. None of the bones show signs of breakage or weapon blows.";
	text3 = "Very odd and unsettling. Certainly something that wasn't mentioned when you learned about the Kranas Woods as a child.";
	text4 = "This is identical to what you saw in the last grove. This seems to be a regular feature.";
	code =
		sf(this_town,2,1);
		if (gf(80,20) == 0) {
			sf(80,20,1);
			rs(4);
			}
			else rs(3);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0 && gf(30,17) == 2;
	text1 = "You find a huge, old stump. This was once one of the grand, enchanted trees of the grove. It died, but this enormous, grand pillar of wood remains.";
	text2 = "Remembering the request you received in the Tower of the Erudico, you examine the stump closely, looking for a remaining trickle of fresh sap.";
	text3 = "Alas, this stump is too old. It's completely dry.";
	text4 = "You are in luck. You pull off a bit of bark, and a tiny trickle of sap slowly runs out. The grove immediately fills with a powerful, piney smell. You collect the sap.";
	code =
		sf(this_town,3,1);
		inc_flag(18,13,1);
		if (gf(18,13) != 3)
			rs(4);
			else {
				rs(3);
				set_spec_item(18,1);
				}
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0 && gf(30,17) == 2;
	text1 = "You find a huge, old stump. This was once one of the grand, enchanted trees of the grove. It died, but this enormous, grand pillar of wood remains.";
	text2 = "Remembering the request you received in the Tower of the Erudico, you examine the stump closely, looking for a remaining trickle of fresh sap.";
	text3 = "Alas, this stump is too old. It's completely dry.";
	text4 = "You are in luck. You pull off a bit of bark, and a tiny trickle of sap slowly runs out. The grove immediately fills with a powerful, piney smell. You collect the sap.";
	code =
		sf(this_town,4,1);
		inc_flag(18,13,1);
		if (gf(18,13) != 3)
			rs(4);
			else {
				rs(3);
				set_spec_item(18,1);
				}
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "You have found the heart of the grove. Here in the middle of this thick forest, you find a huge, ancient ... plant thing. It's an enormous tangle of vines, protected by a host of toothy mouths.";
	text2 = "As mighty and powerful as it is, it is also sick. The leaves have edges with brown, and the vines look a bit dry. When you enter the clearing, it shies away from you pathetically.";
	text3 = "Before you can decide what to so about it, a huge serpent slithers out from between the roots at its base. It's a massive snake, about twenty feet long, with a malevolent humanish face. It hisses, _You have come! Haven comesss to answer for itsss crimesss!_";
	code =
		sf(this_town,5,1);
		spawn_creature(1836);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode; // chest
	tag = 13;
	condition = 1;
	text1 = "The chest is full of coal. You dig through it a bit, but you don't find anything of interest.";
	text2 = "Then, remembering what you read recently, you look at the coal closely. It doesn't seem unusual, though. Just coal.";
	code =
		rs(2);
		if ((gf(18,20) > 0) && (has_spec_item(19) == 0) && (gf(18,11) == 0))
			as(2);
	break;

begintalknode; // good chest
	tag = 14;
	condition = 1;
	text1 = "The chest is full of coal. You dig through it a bit, but you don't find anything of interest.";
	text2 = "Then, remembering what you read recently, you look at the coal closely. When you inspect it at just the right angle, it glitters very slightly. Something has been done to it. You help yourself to a sack of it.";
	code =
		rs(2);
		if ((gf(18,20) > 0) && (has_spec_item(19) == 0) && (gf(18,11) == 0)) {
			as(2);
			set_spec_item(19,1);
			}
	break;
	
begintalknode; // book 1
	tag = 15;
	condition = 1;
	text1 = "The book is full of page after page of a strange runic language you have never encountered before. As interesting as it might be, you lack the several years you would need to study it.";
	text2 = "The middle two pages are different. You find a short incantation, painted in gold leaf in an alphabet you can comprehend. It seems like whoever wrote this book wanted anyone who passed to learn it.";
	text3 = "You take a minute to copy it.";
	code =
		if (gf(18,19) == 0)
			sf(18,19,1);
			else rs(3);
	break;
	
begintalknode; // book 2
	tag = 16;
	condition = 1;
	text1 = "The book is a record kept by the druids of the grove. It's very thick. The entries go back centuries. Some of them have completely faded. Others are incoherent rambling. You flip through quickly.";
	text2 = "It seems that, around two hundred years ago, this grove grew angry. It was more upset than the others, perhaps because it was so close to the 'weaklings' of the Gentle Coast. To keep it from lashing out, it had to be restrained by fires.";
	text3 = "It took the Erudico a few years to come up with a solution. Alas, the archaic writing is hard to read. It involves braziers and the 'glittering coal'.";
	text4 = "Apart from a lot of complaining about expansion of Havenite control, there is nothing else of interest.";
	code =
		sf(18,20,1);
	break;

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "With a final blow, the naga is killed. Well, destroyed. It shudders and then sort of melts. The angry magic that made it no longer can hold it together.";
	text2 = "Instantly, the grove calms down. The air feels more peaceful. You can hear the rustling of trees receding, opening up a path to freedom.";
	text3 = "Yet, something remains in the grove. The heart is still here, browned and weak but still alive. It is alone with you.";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "The ancient plant, the heart of the grove, lets out a deafening shriek. You clap your hands over your ears, and it doesn't help. Was it a real sound, or did it only happen in your heads?";
	text2 = "Then there is silence. The plant thing turns brown and crumbles to the ground. The grove changes to. The light is dimmer, the plants look less healthy. It's just an ordinary forest now.";
	text3 = "Now you can loot freely. Who knows what precious offerings have been brought here? Hopefully, it will be nice enough to make up for how very very angry the folk of the Kranas are going to be.";
	text4 = "Hmmm. This grove might be a good source of wood.";
	
begintalknode;
	tag = 19;
	condition = 1;
	text1 = "The naga lets out an angry hiss. Roots start wriggling out of the ground. As you watch with irritation, they tie themselves into crude humanoid forms. The rootlings are how the grove expresses its rage.";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "The naga lets out a long, slow hum. The enormous plant in the center of the grove begins to shake. The serpent opens its mouth, and spores spray out. Everyone nearby feels dizzy.";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "You try to examine the heart of the grove, but it shies away from you. Then the naga distracts you.";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a tall brazier set in the middle of this grove. It is made of bronze, with runes etched in the side. It is empty, and there is no fuel nearby.";
	text2 = "It looks like the grove has been sending out roots to try to tear the thing down. Something kept them from crawling across the stone.";
	code =
	sf(18,21,2);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Read the runes.";
	text1 = "You can't make any sense of them. Some sort of Ro druidic script. In a more peaceful time, they might be of great interest to the scholars of Haven.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = has_spec_item(19) == 0;
	question = "Light the brazier.";
	text1 = "You pile some fuel into the brazier and use flint and tinder to light it. As you do, a fierce wind blows through the grove. Branches fall all around you. The grove lets out a deep, angry moan.";
	text2 = "You try and try, but you can't get a fire going in the basin.";
	action = END_TALK;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = has_spec_item(19) > 0 && gf(18,19) == 0;
	question = "Light the brazier.";
	text1 = "You pile some of the glittering coal into the brazier and use flint and tinder to light it. As you do, a fierce wind blows through the grove. Branches fall all around you. The grove lets out a deep, angry moan.";
	text2 = "As sparks fall on the coals, the wind intensifies. It is keeping the coals from lighting. Eventually, you have to give up. The wind calms down.";
	action = END_TALK;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = has_spec_item(19) > 0 && gf(18,19) > 0;
	question = "Light the brazier.";
	text1 = "You pile some of the glittering coal into the brazier and use flint and tinder to light it. As you do, a fierce wind blows through the grove. Branches fall all around you. The grove lets out a deep, angry moan.";
	text2 = "As sparks fall on the coals, the wind intensifies. It is keeping the coals from lighting.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Say the ritual.";
	text1 = "You mutter the incantation you read in the druid's book. The brazier gleams. The wind is suddenly unable to keep the coals from bursting into flame. The moans of the grove reach a crescendo, then fade away.";
	text3 = "You hear hissing, coming from the undergrowth all around you. The grove has been partially contained.";
	text4 = "The trees nearby rustle. Wood creaks. Roots are pulled out and wood splinters. A new path has opened nearby. You have forced the heart of the woods to open to you.";
	action = END_TALK;
	code =
		sf(18,15 + gf(18,18),1);
		if (gf(18,18) == 0) {
			activate_hidden_group(1);
			if (difficulty() > 1)
				force_char_status(30001,2,8);
			}
		if (gf(18,18) == 1) {
			activate_hidden_group(2);
			if (difficulty() < 3) {
				erase_char(1814);
				}
			if (difficulty() > 1)
				force_char_status(30002,3,8);
			}
		if (gf(18,18) == 2) {
			activate_hidden_group(3);
			if (difficulty() > 1)
				force_char_status(30003,0,6);
			}
		
		rs(4);
		if ((gf(18,15) > 0) && (gf(18,16) > 0) && (gf(18,17) > 0)) {
			as(4);
			}
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Leave the brazier alone.";
	text1 = "You back away.";
	action = END_TALK;
	
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "You encountered these sinister creatures back on Sacramentum. It is a naga. A malevolent spirit, the rage of nature made flesh. It looks down at you and lets out a long, angry hiss.";
	text2 = "_Ahsssss. Haven comess at lassst. The grovess sspread fear, and that bringsss you. You must protect your minesss. Now you can ansswer for your crimesss!_";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_And what are Haven's crimes?_";
	text1 = "_You cut down the woodsss. You make more minesss. Your leadersss take bribesss and let outsidersss eat the sacred land! You killed the grovesss! We mussst defend ourselvesss, or we are lossst._";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_Are you the source of the sickness? The attacks?_";
	text1 = "_Yesss! I am the guiding spirit! I came from the earth to guide thisss poor grove. To drive you out!_";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_I am willing to negotiate._";
	text1 = "_No. There wasss a chance. Once, the Rokaj rose up. Once our poor humansss fought back. Haven swore it would do better. And the crimesss continued._";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_Haven doesn't answer to monsters._ Attack.";
	text1 = "_Yesss! Thisss is the only way!_ The naga surges forward.";
	action = END_TALK;

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_The Great Uprising was a long time ago._";
	text1 = "_Yesss, the lessonsss were learned. Then they were forgotten. Now I will teach them again, in the only way I can!_";
	text2 = "";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_How are the groves being hurt?_";
	text1 = "_The grovesss draw strength from the foressst. They heal the foresst in return, give it power. The more you chop, the sicker the grovesss get._";
	
begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_And how can we settle this dispute?_";
	text1 = "_You are a [P] of Haven. If I kill you, it will tell Haven that none are safe from usss. It is a bold plan, but it is the only way._";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "_Wait! There is something we can offer!_";
	text1 = "_Yesss. You offer your flesh. Soon, you will be in me. Then Haven will learn at lassst!_";
	action = END_TALK;

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "_Time to die, vermin._";
	text1 = "_Yesss! Thisss is the only way!_ The naga surges forward.";
	action = END_TALK;


	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "When you approach the heart of the grove, you can sense it. Its life, its power, its intelligence. It can't talk. It doesn't have a mouth. You can sense it, though, probing your thoughts. It communicates through images and feelings.";
	text2 = "Your common mercenary wouldn't know what to do here. But you do. Part of your training was in diplomacy. In the name of Haven, you can _talk_ to anything.";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Try to communicate with it.";
	text1 = "You imagine a few things. The armies of Haven. A map of the Ro. A rootling attack. You sense confusion. This is not a creature who operates with a lot of careful planning.";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Think about treasure.";
	text1 = "You think about your desire for wealth. You see a grove to the east. It has treasure you can take. But you detect thoughts of another grove nearby. One kept hidden by this big plant.";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Think about a peaceful forest.";
	text1 = "The plant joins you in happy meditation on a forest free of war. However, you note this is also a forest free of Haven's industry.";

begintalknode;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "Think about burning the plant down.";
	text1 = "The plant is agitated. Its brittle leaves shudder. It is full of ancient rage, but the ring of enchanted braziers have weakened its will. It is afraid.";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Think about leaving peacefully.";
	text1 = "The plant is full of ancient rage, but the ring of enchanted braziers have weakened its will. It only wants to hide and rest. When you imagine peace, it withdraws from you.";
	action = END_TALK;

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "Think about the joy of battle.";
	text1 = "At last, for the first time in many years, the plant remembers its spirit. A spirit of protection, of the destruction of invaders. Its vines extend in all directions. The mouth things bear their teeth.";
	text2 = "You have one final image: Of its roots, sinking hungrily into your dead flesh.";
	action = END_TALK;
	code =
		set_attitude(1837,10);
	break;
	
begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "Think about leaving the creature to heal.";
	text1 = "The plant shudders with happiness. The thought of being left alone in its forest calms it. It only wants to hide and rest. When you imagine peace, it withdraws from you.";
	action = END_TALK;


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				